public class InterfaceDemo07 {
    public static void main(String[] args) {
        Usb usb = new Mouse();// 多态
        usb.open();
        usb.close();
    }
}


interface Usb {

    void close();

    void open();
}

class Mouse implements Usb {

    @Override
    public void close() {
        System.out.println("鼠标关闭");
    }

    @Override
    public void open() {
        System.out.println("鼠标插入");
    }
}

class Upan implements Usb {

    @Override
    public void close() {
        System.out.println("U盘拔出");
    }

    @Override
    public void open() {
        System.out.println("u盘插入");
    }
}

class Phone implements Usb {

    @Override
    public void close() {
        System.out.println("手机关闭");
    }

    @Override
    public void open() {
        System.out.println("插入");
    }
}
